﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Ivy.Common.Framework.GeneralUtility;
using Ivy.UserManagement.Entity;
using Ivy.SiteAdministration.Entity;

namespace Ivy.UserManagement.IBusinessLogic
{
    public interface IUserManagementBus
    {
        #region UserManagementBus Members
        bool SignUp(Person pPerson, User pUser, Sys_OrganizationMaster pSys_OrganizationMaster, UserOrganizationRole pUserOrganizationRole, List<UserOrganizationRole> pUserOrganizationRoles);
        bool SignUp(Person pPerson, User pUser, List<UserOrganizationRole> pUserOrganizationRoles);
        bool SignUp(Person pPerson, User pUser);
        bool Login(string UserLoginID, string Password);
        //bool IsAcitivityAuthorized(string UserOrganizationCode, string ActivityCode, string UserLoginID);
        bool SendEmalVerificationCodeByEmailForPrimaryEmail(Person Person, User User);
        bool SendNewSignUpNotificationEmail(Person pPerson, User pUser);
        bool InsertPersonDataFromExcelSheet(List<Person> pPerson);
        #endregion

        #region Person

        bool UpdateRegisteredPerson(Person PersonEntity);
        bool AddPerson(Person PersonEntity);
        Person GetPersonByKey(int PersonKey);
        Person GetPersonByPrimaryEmailId(string PersonPrimaryEmailId);
        Person GetPersonByFirstNameLastNamePrimaryEmailIdMobileNumberDateOfBirth(string FirstName, string LastName, string EmailId, string MobileNumber, Nullable<DateTime> DateOfBirth);
        List<Person> GetAllUser();
        List<PersonReport> GetAllPersonDetails();
        PersonReport GetPersonReportByKey(int PersonKey);

        #endregion

        #region User
        bool UpdateSignUpUser(User UserEntity);
        User GetUserByPersonKey(int UserPersonKey);
        User GetUserByLoginID(string UserLoginID);
        bool IsLoginIDExisting(string UserLoginID);
        #endregion

        #region UserProfileImage
        bool SaveUserProfileImage(PersonProfileImage PersonProfileImageEntity);
        PersonProfileImage GetPersonProfileImageByPersonKey(int PersonKey);
        #endregion

        #region UserOrganizationRole
        List<UserOrganizationRole> GetUserOrganizationRolesForSelectedUser(int UserPersonKey);

        bool AddUserOrganizationRole(UserOrganizationRole UserOrganizationRoleEntity);
        UserOrganizationRole GetByPrimaryKey(int UserKey, int UserOrganizationKey, int UserRoleKey);
        #endregion

        #region UserOrganizationRoleSummaryReport
        List<UserOrganizationRoleSummaryReport> GetByUserKeyUserOrganizationKey(int UserKey, int UserOrganizationKey);
        List<Sys_RoleMaster> GetAllSysRoleMasterByUserKeyUserOrganizationKey(int UserKey, int UserOrganizationKey);
        #endregion

        #region ForgotPassword
        bool SendVerificationCodeByEmailForForgetPassword(Person Person, User User);
        bool ResetUserPasswordByPersonKey(int PersonKey, string NewPassword);
        #endregion

        #region Project Member
        bool SaveProjectMember(ProjectMemberMaster ProjectMemberMasterEntity);
        bool UpdateRegisteredProjectMember(ProjectMemberMaster ProjectMemberMasterEntity);
        List<ProjectMemberMaster> GetAllProjectMember();
        ProjectMemberMaster GetProjectMemberByPrimaryKey(int ProjectMemberKey);
        #endregion project Member
    }
}
